/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ejb;

import javax.ejb.EJB;
import javax.ejb.Stateless;
import service.Universe;
import service.UniverseFacadeREST;

/**
 *
 * @author andrew
 */
@Stateless
public class StepManager {

    @EJB
    UniverseFacadeREST universeManager;

    // universo inserito e non ancora validato dall'amministratore
    public void addUniverse(String name, String description){
        
        try{
            Universe universe = new Universe();
            universe.setName(name);
            universe.setDescription(description);
            universe.setIsValidated(false);
            universe.setIsReady(0);
            
            universeManager.create(universe);
        }catch(Exception e){
            System.err.println(e.getMessage());
        }
        
    }
    
}
